package cn.tedu.hm.controller;

import cn.tedu.hm.pojo.vo.OccupancyRateListItemVO;
import cn.tedu.hm.pojo.vo.SalaryShowListItemVO;
import cn.tedu.hm.service.IOccupancyRateService;
import cn.tedu.hm.service.ISalaryShowService;
import cn.tedu.hm.wep.JsonResult;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

import java.util.Date;
import java.util.List;

/**
 * @author tj41h
 */
@Slf4j
@Validated
@RestController
@RequestMapping("/statistics/")
@Api(tags="10. 数据统计模块")
@Transactional
public class OccupancyRateController {

    @Autowired
    private IOccupancyRateService occupancyRateService;

    @GetMapping("rate")
    @ApiOperation("房间入住率")
    @ApiOperationSupport(order = 410)
    public JsonResult<List<OccupancyRateListItemVO>> list(@RequestParam(value = "value") String value) {
        log.debug("开始处理【查询房间入住率】的请求【{}】",value);
        List<OccupancyRateListItemVO> list = occupancyRateService.list(value);
        return JsonResult.ok(list);
    }



}
